import market

def menu():
    print("---欢迎选购---")
    print('1.查看所有商品信息；')
    print('2.查找商品；')
    print('3.添加商品；')
    print('4.修改商品价格和折扣；')
    print('5.删除商品；')
    print('6.查看所有订单；')
    print('7.删除订单；')
    print('8.订单统计；')
    print('9.商品结算（添加订单）；')
    print('10.退出')
def main():
    while True:
        choice=int(input("请输入你的选择："))
        if choice==1:
            market.look_product()
        elif choice==2:
            market.find_product()
        elif choice==3:
            market.add_product()
        elif choice==4:
            market.modify_product()
        elif choice==5:
            market.delete_product()
        elif choice==6:
            market.show_order()
        elif choice==7:
            market.del_order()
        elif choice==8:
            market.count_order()
        elif choice==9:
            market.settle()
        elif choice==10:
            print("退出成功")
            break
        else:
            print("输入有误，请重新输入：")
            continue
if __name__ == '__main__':
    menu()
    main()